% /*******************************************************************************
%  * Variable Correction Method (main routine)
%  * *****************************************************************************
%  * The key point here is to compute the Correction Constant based on data pattern.
%  * It's data-dependent scheme. Then trunct_mult is used to compute the final result.
%  * It's different from CC in that, E_round is not a part of correction constant
%  * computed from vcm_const.
%  * 
%  * @param a     Multiplicand
%  * @param b     Multiplier
%  * @param m     Multiplicand Width
%  * @param n     Multiplier Width
%  * @param r     Product Width
%  * @param k     Extra bits to keep
%  * @return      Final Product
%  */
function [p,corr_const] = vcm(a, b, m, n, r, k)
err_rnd = 2^(-r-1) * (1.0 - 2^(-k+1));
err_rnd = rnd_zero(err_rnd, r+k);
corr_const = vcm_const(a, b, m, n, r, k);
corr_const = corr_const + err_rnd;
p = trunc_mult(a, b, corr_const, m, n, r, k);
end






